{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/xda/miniconda3/envs/cpy/lib/python3.9/site-packages/akshare/__init__.py:2714: UserWarning: 为了支持更多特性，请将 Pandas 升级到 2.1.0 及以上版本！\n",
      "  warnings.warn(\n"
     ]
    }
   ],
   "source": [
    "import akshare as ak"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "reits_info = ak.reits_realtime_em()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>序号</th>\n",
       "      <th>代码</th>\n",
       "      <th>名称</th>\n",
       "      <th>最新价</th>\n",
       "      <th>涨跌额</th>\n",
       "      <th>涨跌幅</th>\n",
       "      <th>成交量</th>\n",
       "      <th>成交额</th>\n",
       "      <th>开盘价</th>\n",
       "      <th>最高价</th>\n",
       "      <th>最低价</th>\n",
       "      <th>昨收</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>508096</td>\n",
       "      <td>中航京能光伏REIT</td>\n",
       "      <td>10.399</td>\n",
       "      <td>0.170</td>\n",
       "      <td>1.66</td>\n",
       "      <td>13241.0</td>\n",
       "      <td>1.368326e+07</td>\n",
       "      <td>10.213</td>\n",
       "      <td>10.400</td>\n",
       "      <td>10.213</td>\n",
       "      <td>10.229</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>180501</td>\n",
       "      <td>红土创新深圳安居REIT</td>\n",
       "      <td>2.591</td>\n",
       "      <td>0.032</td>\n",
       "      <td>1.25</td>\n",
       "      <td>42845.0</td>\n",
       "      <td>1.099559e+07</td>\n",
       "      <td>2.572</td>\n",
       "      <td>2.593</td>\n",
       "      <td>2.534</td>\n",
       "      <td>2.559</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>508021</td>\n",
       "      <td>国泰君安临港创新产业园REIT</td>\n",
       "      <td>4.410</td>\n",
       "      <td>0.037</td>\n",
       "      <td>0.85</td>\n",
       "      <td>43551.0</td>\n",
       "      <td>1.908618e+07</td>\n",
       "      <td>4.353</td>\n",
       "      <td>4.414</td>\n",
       "      <td>4.320</td>\n",
       "      <td>4.373</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>180801</td>\n",
       "      <td>中航首钢绿能REIT</td>\n",
       "      <td>13.580</td>\n",
       "      <td>0.099</td>\n",
       "      <td>0.73</td>\n",
       "      <td>16392.0</td>\n",
       "      <td>2.214851e+07</td>\n",
       "      <td>13.481</td>\n",
       "      <td>13.622</td>\n",
       "      <td>13.370</td>\n",
       "      <td>13.481</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>508088</td>\n",
       "      <td>国泰君安东久新经济REIT</td>\n",
       "      <td>3.181</td>\n",
       "      <td>0.023</td>\n",
       "      <td>0.73</td>\n",
       "      <td>26466.0</td>\n",
       "      <td>8.406602e+06</td>\n",
       "      <td>3.119</td>\n",
       "      <td>3.199</td>\n",
       "      <td>3.119</td>\n",
       "      <td>3.158</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>508008</td>\n",
       "      <td>国金中国铁建REIT</td>\n",
       "      <td>9.515</td>\n",
       "      <td>0.062</td>\n",
       "      <td>0.66</td>\n",
       "      <td>43029.0</td>\n",
       "      <td>4.096097e+07</td>\n",
       "      <td>9.467</td>\n",
       "      <td>9.555</td>\n",
       "      <td>9.375</td>\n",
       "      <td>9.453</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>508031</td>\n",
       "      <td>国泰君安城投宽庭保租房REIT</td>\n",
       "      <td>3.053</td>\n",
       "      <td>0.015</td>\n",
       "      <td>0.49</td>\n",
       "      <td>17253.0</td>\n",
       "      <td>5.254575e+06</td>\n",
       "      <td>3.037</td>\n",
       "      <td>3.058</td>\n",
       "      <td>3.024</td>\n",
       "      <td>3.038</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8</td>\n",
       "      <td>508028</td>\n",
       "      <td>中信建投国家电投新能源REIT</td>\n",
       "      <td>10.184</td>\n",
       "      <td>0.019</td>\n",
       "      <td>0.19</td>\n",
       "      <td>27912.0</td>\n",
       "      <td>2.838312e+07</td>\n",
       "      <td>10.165</td>\n",
       "      <td>10.195</td>\n",
       "      <td>10.115</td>\n",
       "      <td>10.165</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9</td>\n",
       "      <td>508006</td>\n",
       "      <td>富国首创水务REIT</td>\n",
       "      <td>3.752</td>\n",
       "      <td>0.007</td>\n",
       "      <td>0.19</td>\n",
       "      <td>24728.0</td>\n",
       "      <td>9.280578e+06</td>\n",
       "      <td>3.730</td>\n",
       "      <td>3.761</td>\n",
       "      <td>3.729</td>\n",
       "      <td>3.745</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10</td>\n",
       "      <td>180301</td>\n",
       "      <td>红土创新盐田港REIT</td>\n",
       "      <td>2.351</td>\n",
       "      <td>0.001</td>\n",
       "      <td>0.04</td>\n",
       "      <td>37960.0</td>\n",
       "      <td>8.937926e+06</td>\n",
       "      <td>2.337</td>\n",
       "      <td>2.368</td>\n",
       "      <td>2.310</td>\n",
       "      <td>2.350</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>11</td>\n",
       "      <td>508068</td>\n",
       "      <td>华夏北京保障房REIT</td>\n",
       "      <td>2.867</td>\n",
       "      <td>0.001</td>\n",
       "      <td>0.03</td>\n",
       "      <td>59046.0</td>\n",
       "      <td>1.693628e+07</td>\n",
       "      <td>2.866</td>\n",
       "      <td>2.876</td>\n",
       "      <td>2.850</td>\n",
       "      <td>2.866</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>12</td>\n",
       "      <td>508001</td>\n",
       "      <td>浙商沪杭甬REIT</td>\n",
       "      <td>8.241</td>\n",
       "      <td>0.002</td>\n",
       "      <td>0.02</td>\n",
       "      <td>16561.0</td>\n",
       "      <td>1.364811e+07</td>\n",
       "      <td>8.206</td>\n",
       "      <td>8.249</td>\n",
       "      <td>8.205</td>\n",
       "      <td>8.239</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>13</td>\n",
       "      <td>180201</td>\n",
       "      <td>平安广州广河REIT</td>\n",
       "      <td>9.718</td>\n",
       "      <td>0.002</td>\n",
       "      <td>0.02</td>\n",
       "      <td>19948.0</td>\n",
       "      <td>1.938464e+07</td>\n",
       "      <td>9.616</td>\n",
       "      <td>9.814</td>\n",
       "      <td>9.616</td>\n",
       "      <td>9.716</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>14</td>\n",
       "      <td>508077</td>\n",
       "      <td>华夏基金华润有巢REIT</td>\n",
       "      <td>2.450</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>78508.0</td>\n",
       "      <td>1.930020e+07</td>\n",
       "      <td>2.450</td>\n",
       "      <td>2.480</td>\n",
       "      <td>2.431</td>\n",
       "      <td>2.450</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>15</td>\n",
       "      <td>508033</td>\n",
       "      <td>深高REIT</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>6.825</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>16</td>\n",
       "      <td>508026</td>\n",
       "      <td>电建清源</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.675</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>17</td>\n",
       "      <td>508017</td>\n",
       "      <td>金茂商业</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.670</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>18</td>\n",
       "      <td>508011</td>\n",
       "      <td>物美消费</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.383</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>19</td>\n",
       "      <td>180601</td>\n",
       "      <td>华夏华润商业REIT</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>6.902</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>20</td>\n",
       "      <td>508000</td>\n",
       "      <td>华安张江产业园REIT</td>\n",
       "      <td>2.713</td>\n",
       "      <td>-0.001</td>\n",
       "      <td>-0.04</td>\n",
       "      <td>50262.0</td>\n",
       "      <td>1.363384e+07</td>\n",
       "      <td>2.687</td>\n",
       "      <td>2.730</td>\n",
       "      <td>2.675</td>\n",
       "      <td>2.714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>21</td>\n",
       "      <td>508058</td>\n",
       "      <td>中金厦门安居REIT</td>\n",
       "      <td>2.767</td>\n",
       "      <td>-0.002</td>\n",
       "      <td>-0.07</td>\n",
       "      <td>78526.0</td>\n",
       "      <td>2.166828e+07</td>\n",
       "      <td>2.756</td>\n",
       "      <td>2.798</td>\n",
       "      <td>2.751</td>\n",
       "      <td>2.769</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>22</td>\n",
       "      <td>180103</td>\n",
       "      <td>华夏和达高科REIT</td>\n",
       "      <td>2.353</td>\n",
       "      <td>-0.003</td>\n",
       "      <td>-0.13</td>\n",
       "      <td>34246.0</td>\n",
       "      <td>8.039953e+06</td>\n",
       "      <td>2.341</td>\n",
       "      <td>2.361</td>\n",
       "      <td>2.300</td>\n",
       "      <td>2.356</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>23</td>\n",
       "      <td>508007</td>\n",
       "      <td>中金山东高速REIT</td>\n",
       "      <td>7.150</td>\n",
       "      <td>-0.012</td>\n",
       "      <td>-0.17</td>\n",
       "      <td>17998.0</td>\n",
       "      <td>1.286335e+07</td>\n",
       "      <td>7.185</td>\n",
       "      <td>7.250</td>\n",
       "      <td>7.100</td>\n",
       "      <td>7.162</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>24</td>\n",
       "      <td>508099</td>\n",
       "      <td>建信中关村REIT</td>\n",
       "      <td>2.338</td>\n",
       "      <td>-0.006</td>\n",
       "      <td>-0.26</td>\n",
       "      <td>81281.0</td>\n",
       "      <td>1.885344e+07</td>\n",
       "      <td>2.329</td>\n",
       "      <td>2.344</td>\n",
       "      <td>2.290</td>\n",
       "      <td>2.344</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>25</td>\n",
       "      <td>180202</td>\n",
       "      <td>华夏越秀高速REIT</td>\n",
       "      <td>7.141</td>\n",
       "      <td>-0.019</td>\n",
       "      <td>-0.27</td>\n",
       "      <td>15670.0</td>\n",
       "      <td>1.118705e+07</td>\n",
       "      <td>7.159</td>\n",
       "      <td>7.174</td>\n",
       "      <td>7.117</td>\n",
       "      <td>7.160</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>26</td>\n",
       "      <td>508009</td>\n",
       "      <td>中金安徽交控REIT</td>\n",
       "      <td>8.129</td>\n",
       "      <td>-0.030</td>\n",
       "      <td>-0.37</td>\n",
       "      <td>33995.0</td>\n",
       "      <td>2.763976e+07</td>\n",
       "      <td>8.154</td>\n",
       "      <td>8.159</td>\n",
       "      <td>8.119</td>\n",
       "      <td>8.159</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>27</td>\n",
       "      <td>508056</td>\n",
       "      <td>中金普洛斯REIT</td>\n",
       "      <td>3.580</td>\n",
       "      <td>-0.016</td>\n",
       "      <td>-0.44</td>\n",
       "      <td>64546.0</td>\n",
       "      <td>2.305100e+07</td>\n",
       "      <td>3.609</td>\n",
       "      <td>3.609</td>\n",
       "      <td>3.521</td>\n",
       "      <td>3.596</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>28</td>\n",
       "      <td>508066</td>\n",
       "      <td>华泰江苏交控REIT</td>\n",
       "      <td>6.923</td>\n",
       "      <td>-0.033</td>\n",
       "      <td>-0.47</td>\n",
       "      <td>18390.0</td>\n",
       "      <td>1.274584e+07</td>\n",
       "      <td>6.916</td>\n",
       "      <td>6.951</td>\n",
       "      <td>6.916</td>\n",
       "      <td>6.956</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>29</td>\n",
       "      <td>508027</td>\n",
       "      <td>东吴苏园产业REIT</td>\n",
       "      <td>3.180</td>\n",
       "      <td>-0.018</td>\n",
       "      <td>-0.56</td>\n",
       "      <td>66290.0</td>\n",
       "      <td>2.111244e+07</td>\n",
       "      <td>3.194</td>\n",
       "      <td>3.218</td>\n",
       "      <td>3.141</td>\n",
       "      <td>3.198</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>30</td>\n",
       "      <td>180101</td>\n",
       "      <td>博时蛇口产园REIT</td>\n",
       "      <td>1.947</td>\n",
       "      <td>-0.013</td>\n",
       "      <td>-0.66</td>\n",
       "      <td>149296.0</td>\n",
       "      <td>2.898595e+07</td>\n",
       "      <td>1.958</td>\n",
       "      <td>1.964</td>\n",
       "      <td>1.900</td>\n",
       "      <td>1.960</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>31</td>\n",
       "      <td>180102</td>\n",
       "      <td>华夏合肥高新REIT</td>\n",
       "      <td>1.909</td>\n",
       "      <td>-0.016</td>\n",
       "      <td>-0.83</td>\n",
       "      <td>56777.0</td>\n",
       "      <td>1.081247e+07</td>\n",
       "      <td>1.898</td>\n",
       "      <td>1.920</td>\n",
       "      <td>1.878</td>\n",
       "      <td>1.925</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>32</td>\n",
       "      <td>180401</td>\n",
       "      <td>鹏华深圳能源REIT</td>\n",
       "      <td>6.885</td>\n",
       "      <td>-0.062</td>\n",
       "      <td>-0.89</td>\n",
       "      <td>82062.0</td>\n",
       "      <td>5.664325e+07</td>\n",
       "      <td>6.940</td>\n",
       "      <td>6.965</td>\n",
       "      <td>6.870</td>\n",
       "      <td>6.947</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>33</td>\n",
       "      <td>508019</td>\n",
       "      <td>中金湖北科投光谷REIT</td>\n",
       "      <td>2.228</td>\n",
       "      <td>-0.021</td>\n",
       "      <td>-0.93</td>\n",
       "      <td>26232.0</td>\n",
       "      <td>5.858946e+06</td>\n",
       "      <td>2.246</td>\n",
       "      <td>2.284</td>\n",
       "      <td>2.215</td>\n",
       "      <td>2.249</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>34</td>\n",
       "      <td>508018</td>\n",
       "      <td>华夏中国交建REIT</td>\n",
       "      <td>5.461</td>\n",
       "      <td>-0.076</td>\n",
       "      <td>-1.37</td>\n",
       "      <td>111468.0</td>\n",
       "      <td>6.084459e+07</td>\n",
       "      <td>5.534</td>\n",
       "      <td>5.534</td>\n",
       "      <td>5.401</td>\n",
       "      <td>5.537</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>35</td>\n",
       "      <td>508098</td>\n",
       "      <td>嘉实京东仓储基础设施REIT</td>\n",
       "      <td>2.999</td>\n",
       "      <td>-0.083</td>\n",
       "      <td>-2.69</td>\n",
       "      <td>77957.0</td>\n",
       "      <td>2.353497e+07</td>\n",
       "      <td>3.072</td>\n",
       "      <td>3.072</td>\n",
       "      <td>2.990</td>\n",
       "      <td>3.082</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    序号      代码               名称     最新价    涨跌额   涨跌幅       成交量           成交额  \\\n",
       "0    1  508096       中航京能光伏REIT  10.399  0.170  1.66   13241.0  1.368326e+07   \n",
       "1    2  180501     红土创新深圳安居REIT   2.591  0.032  1.25   42845.0  1.099559e+07   \n",
       "2    3  508021  国泰君安临港创新产业园REIT   4.410  0.037  0.85   43551.0  1.908618e+07   \n",
       "3    4  180801       中航首钢绿能REIT  13.580  0.099  0.73   16392.0  2.214851e+07   \n",
       "4    5  508088    国泰君安东久新经济REIT   3.181  0.023  0.73   26466.0  8.406602e+06   \n",
       "5    6  508008       国金中国铁建REIT   9.515  0.062  0.66   43029.0  4.096097e+07   \n",
       "6    7  508031  国泰君安城投宽庭保租房REIT   3.053  0.015  0.49   17253.0  5.254575e+06   \n",
       "7    8  508028  中信建投国家电投新能源REIT  10.184  0.019  0.19   27912.0  2.838312e+07   \n",
       "8    9  508006       富国首创水务REIT   3.752  0.007  0.19   24728.0  9.280578e+06   \n",
       "9   10  180301      红土创新盐田港REIT   2.351  0.001  0.04   37960.0  8.937926e+06   \n",
       "10  11  508068      华夏北京保障房REIT   2.867  0.001  0.03   59046.0  1.693628e+07   \n",
       "11  12  508001        浙商沪杭甬REIT   8.241  0.002  0.02   16561.0  1.364811e+07   \n",
       "12  13  180201       平安广州广河REIT   9.718  0.002  0.02   19948.0  1.938464e+07   \n",
       "13  14  508077     华夏基金华润有巢REIT   2.450  0.000  0.00   78508.0  1.930020e+07   \n",
       "14  15  508033           深高REIT     NaN    NaN   NaN       NaN           NaN   \n",
       "15  16  508026             电建清源     NaN    NaN   NaN       NaN           NaN   \n",
       "16  17  508017             金茂商业     NaN    NaN   NaN       NaN           NaN   \n",
       "17  18  508011             物美消费     NaN    NaN   NaN       NaN           NaN   \n",
       "18  19  180601       华夏华润商业REIT     NaN    NaN   NaN       NaN           NaN   \n",
       "19  20  508000      华安张江产业园REIT   2.713 -0.001 -0.04   50262.0  1.363384e+07   \n",
       "20  21  508058       中金厦门安居REIT   2.767 -0.002 -0.07   78526.0  2.166828e+07   \n",
       "21  22  180103       华夏和达高科REIT   2.353 -0.003 -0.13   34246.0  8.039953e+06   \n",
       "22  23  508007       中金山东高速REIT   7.150 -0.012 -0.17   17998.0  1.286335e+07   \n",
       "23  24  508099        建信中关村REIT   2.338 -0.006 -0.26   81281.0  1.885344e+07   \n",
       "24  25  180202       华夏越秀高速REIT   7.141 -0.019 -0.27   15670.0  1.118705e+07   \n",
       "25  26  508009       中金安徽交控REIT   8.129 -0.030 -0.37   33995.0  2.763976e+07   \n",
       "26  27  508056        中金普洛斯REIT   3.580 -0.016 -0.44   64546.0  2.305100e+07   \n",
       "27  28  508066       华泰江苏交控REIT   6.923 -0.033 -0.47   18390.0  1.274584e+07   \n",
       "28  29  508027       东吴苏园产业REIT   3.180 -0.018 -0.56   66290.0  2.111244e+07   \n",
       "29  30  180101       博时蛇口产园REIT   1.947 -0.013 -0.66  149296.0  2.898595e+07   \n",
       "30  31  180102       华夏合肥高新REIT   1.909 -0.016 -0.83   56777.0  1.081247e+07   \n",
       "31  32  180401       鹏华深圳能源REIT   6.885 -0.062 -0.89   82062.0  5.664325e+07   \n",
       "32  33  508019     中金湖北科投光谷REIT   2.228 -0.021 -0.93   26232.0  5.858946e+06   \n",
       "33  34  508018       华夏中国交建REIT   5.461 -0.076 -1.37  111468.0  6.084459e+07   \n",
       "34  35  508098   嘉实京东仓储基础设施REIT   2.999 -0.083 -2.69   77957.0  2.353497e+07   \n",
       "\n",
       "       开盘价     最高价     最低价      昨收  \n",
       "0   10.213  10.400  10.213  10.229  \n",
       "1    2.572   2.593   2.534   2.559  \n",
       "2    4.353   4.414   4.320   4.373  \n",
       "3   13.481  13.622  13.370  13.481  \n",
       "4    3.119   3.199   3.119   3.158  \n",
       "5    9.467   9.555   9.375   9.453  \n",
       "6    3.037   3.058   3.024   3.038  \n",
       "7   10.165  10.195  10.115  10.165  \n",
       "8    3.730   3.761   3.729   3.745  \n",
       "9    2.337   2.368   2.310   2.350  \n",
       "10   2.866   2.876   2.850   2.866  \n",
       "11   8.206   8.249   8.205   8.239  \n",
       "12   9.616   9.814   9.616   9.716  \n",
       "13   2.450   2.480   2.431   2.450  \n",
       "14     NaN     NaN     NaN   6.825  \n",
       "15     NaN     NaN     NaN   2.675  \n",
       "16     NaN     NaN     NaN   2.670  \n",
       "17     NaN     NaN     NaN   2.383  \n",
       "18     NaN     NaN     NaN   6.902  \n",
       "19   2.687   2.730   2.675   2.714  \n",
       "20   2.756   2.798   2.751   2.769  \n",
       "21   2.341   2.361   2.300   2.356  \n",
       "22   7.185   7.250   7.100   7.162  \n",
       "23   2.329   2.344   2.290   2.344  \n",
       "24   7.159   7.174   7.117   7.160  \n",
       "25   8.154   8.159   8.119   8.159  \n",
       "26   3.609   3.609   3.521   3.596  \n",
       "27   6.916   6.951   6.916   6.956  \n",
       "28   3.194   3.218   3.141   3.198  \n",
       "29   1.958   1.964   1.900   1.960  \n",
       "30   1.898   1.920   1.878   1.925  \n",
       "31   6.940   6.965   6.870   6.947  \n",
       "32   2.246   2.284   2.215   2.249  \n",
       "33   5.534   5.534   5.401   5.537  \n",
       "34   3.072   3.072   2.990   3.082  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "reits_info.head(50)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "reits_info.dropna(inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>序号</th>\n",
       "      <th>代码</th>\n",
       "      <th>名称</th>\n",
       "      <th>最新价</th>\n",
       "      <th>涨跌额</th>\n",
       "      <th>涨跌幅</th>\n",
       "      <th>成交量</th>\n",
       "      <th>成交额</th>\n",
       "      <th>开盘价</th>\n",
       "      <th>最高价</th>\n",
       "      <th>最低价</th>\n",
       "      <th>昨收</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>508096</td>\n",
       "      <td>中航京能光伏REIT</td>\n",
       "      <td>10.399</td>\n",
       "      <td>0.170</td>\n",
       "      <td>1.66</td>\n",
       "      <td>13241.0</td>\n",
       "      <td>1.368326e+07</td>\n",
       "      <td>10.213</td>\n",
       "      <td>10.400</td>\n",
       "      <td>10.213</td>\n",
       "      <td>10.229</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>180501</td>\n",
       "      <td>红土创新深圳安居REIT</td>\n",
       "      <td>2.591</td>\n",
       "      <td>0.032</td>\n",
       "      <td>1.25</td>\n",
       "      <td>42845.0</td>\n",
       "      <td>1.099559e+07</td>\n",
       "      <td>2.572</td>\n",
       "      <td>2.593</td>\n",
       "      <td>2.534</td>\n",
       "      <td>2.559</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>508021</td>\n",
       "      <td>国泰君安临港创新产业园REIT</td>\n",
       "      <td>4.410</td>\n",
       "      <td>0.037</td>\n",
       "      <td>0.85</td>\n",
       "      <td>43551.0</td>\n",
       "      <td>1.908618e+07</td>\n",
       "      <td>4.353</td>\n",
       "      <td>4.414</td>\n",
       "      <td>4.320</td>\n",
       "      <td>4.373</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>180801</td>\n",
       "      <td>中航首钢绿能REIT</td>\n",
       "      <td>13.580</td>\n",
       "      <td>0.099</td>\n",
       "      <td>0.73</td>\n",
       "      <td>16392.0</td>\n",
       "      <td>2.214851e+07</td>\n",
       "      <td>13.481</td>\n",
       "      <td>13.622</td>\n",
       "      <td>13.370</td>\n",
       "      <td>13.481</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>508088</td>\n",
       "      <td>国泰君安东久新经济REIT</td>\n",
       "      <td>3.181</td>\n",
       "      <td>0.023</td>\n",
       "      <td>0.73</td>\n",
       "      <td>26466.0</td>\n",
       "      <td>8.406602e+06</td>\n",
       "      <td>3.119</td>\n",
       "      <td>3.199</td>\n",
       "      <td>3.119</td>\n",
       "      <td>3.158</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>508008</td>\n",
       "      <td>国金中国铁建REIT</td>\n",
       "      <td>9.515</td>\n",
       "      <td>0.062</td>\n",
       "      <td>0.66</td>\n",
       "      <td>43029.0</td>\n",
       "      <td>4.096097e+07</td>\n",
       "      <td>9.467</td>\n",
       "      <td>9.555</td>\n",
       "      <td>9.375</td>\n",
       "      <td>9.453</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>508031</td>\n",
       "      <td>国泰君安城投宽庭保租房REIT</td>\n",
       "      <td>3.053</td>\n",
       "      <td>0.015</td>\n",
       "      <td>0.49</td>\n",
       "      <td>17253.0</td>\n",
       "      <td>5.254575e+06</td>\n",
       "      <td>3.037</td>\n",
       "      <td>3.058</td>\n",
       "      <td>3.024</td>\n",
       "      <td>3.038</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8</td>\n",
       "      <td>508028</td>\n",
       "      <td>中信建投国家电投新能源REIT</td>\n",
       "      <td>10.184</td>\n",
       "      <td>0.019</td>\n",
       "      <td>0.19</td>\n",
       "      <td>27912.0</td>\n",
       "      <td>2.838312e+07</td>\n",
       "      <td>10.165</td>\n",
       "      <td>10.195</td>\n",
       "      <td>10.115</td>\n",
       "      <td>10.165</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9</td>\n",
       "      <td>508006</td>\n",
       "      <td>富国首创水务REIT</td>\n",
       "      <td>3.752</td>\n",
       "      <td>0.007</td>\n",
       "      <td>0.19</td>\n",
       "      <td>24728.0</td>\n",
       "      <td>9.280578e+06</td>\n",
       "      <td>3.730</td>\n",
       "      <td>3.761</td>\n",
       "      <td>3.729</td>\n",
       "      <td>3.745</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10</td>\n",
       "      <td>180301</td>\n",
       "      <td>红土创新盐田港REIT</td>\n",
       "      <td>2.351</td>\n",
       "      <td>0.001</td>\n",
       "      <td>0.04</td>\n",
       "      <td>37960.0</td>\n",
       "      <td>8.937926e+06</td>\n",
       "      <td>2.337</td>\n",
       "      <td>2.368</td>\n",
       "      <td>2.310</td>\n",
       "      <td>2.350</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>11</td>\n",
       "      <td>508068</td>\n",
       "      <td>华夏北京保障房REIT</td>\n",
       "      <td>2.867</td>\n",
       "      <td>0.001</td>\n",
       "      <td>0.03</td>\n",
       "      <td>59046.0</td>\n",
       "      <td>1.693628e+07</td>\n",
       "      <td>2.866</td>\n",
       "      <td>2.876</td>\n",
       "      <td>2.850</td>\n",
       "      <td>2.866</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>12</td>\n",
       "      <td>508001</td>\n",
       "      <td>浙商沪杭甬REIT</td>\n",
       "      <td>8.241</td>\n",
       "      <td>0.002</td>\n",
       "      <td>0.02</td>\n",
       "      <td>16561.0</td>\n",
       "      <td>1.364811e+07</td>\n",
       "      <td>8.206</td>\n",
       "      <td>8.249</td>\n",
       "      <td>8.205</td>\n",
       "      <td>8.239</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>13</td>\n",
       "      <td>180201</td>\n",
       "      <td>平安广州广河REIT</td>\n",
       "      <td>9.718</td>\n",
       "      <td>0.002</td>\n",
       "      <td>0.02</td>\n",
       "      <td>19948.0</td>\n",
       "      <td>1.938464e+07</td>\n",
       "      <td>9.616</td>\n",
       "      <td>9.814</td>\n",
       "      <td>9.616</td>\n",
       "      <td>9.716</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>14</td>\n",
       "      <td>508077</td>\n",
       "      <td>华夏基金华润有巢REIT</td>\n",
       "      <td>2.450</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>78508.0</td>\n",
       "      <td>1.930020e+07</td>\n",
       "      <td>2.450</td>\n",
       "      <td>2.480</td>\n",
       "      <td>2.431</td>\n",
       "      <td>2.450</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>20</td>\n",
       "      <td>508000</td>\n",
       "      <td>华安张江产业园REIT</td>\n",
       "      <td>2.713</td>\n",
       "      <td>-0.001</td>\n",
       "      <td>-0.04</td>\n",
       "      <td>50262.0</td>\n",
       "      <td>1.363384e+07</td>\n",
       "      <td>2.687</td>\n",
       "      <td>2.730</td>\n",
       "      <td>2.675</td>\n",
       "      <td>2.714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>21</td>\n",
       "      <td>508058</td>\n",
       "      <td>中金厦门安居REIT</td>\n",
       "      <td>2.767</td>\n",
       "      <td>-0.002</td>\n",
       "      <td>-0.07</td>\n",
       "      <td>78526.0</td>\n",
       "      <td>2.166828e+07</td>\n",
       "      <td>2.756</td>\n",
       "      <td>2.798</td>\n",
       "      <td>2.751</td>\n",
       "      <td>2.769</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>22</td>\n",
       "      <td>180103</td>\n",
       "      <td>华夏和达高科REIT</td>\n",
       "      <td>2.353</td>\n",
       "      <td>-0.003</td>\n",
       "      <td>-0.13</td>\n",
       "      <td>34246.0</td>\n",
       "      <td>8.039953e+06</td>\n",
       "      <td>2.341</td>\n",
       "      <td>2.361</td>\n",
       "      <td>2.300</td>\n",
       "      <td>2.356</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>23</td>\n",
       "      <td>508007</td>\n",
       "      <td>中金山东高速REIT</td>\n",
       "      <td>7.150</td>\n",
       "      <td>-0.012</td>\n",
       "      <td>-0.17</td>\n",
       "      <td>17998.0</td>\n",
       "      <td>1.286335e+07</td>\n",
       "      <td>7.185</td>\n",
       "      <td>7.250</td>\n",
       "      <td>7.100</td>\n",
       "      <td>7.162</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>24</td>\n",
       "      <td>508099</td>\n",
       "      <td>建信中关村REIT</td>\n",
       "      <td>2.338</td>\n",
       "      <td>-0.006</td>\n",
       "      <td>-0.26</td>\n",
       "      <td>81281.0</td>\n",
       "      <td>1.885344e+07</td>\n",
       "      <td>2.329</td>\n",
       "      <td>2.344</td>\n",
       "      <td>2.290</td>\n",
       "      <td>2.344</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>25</td>\n",
       "      <td>180202</td>\n",
       "      <td>华夏越秀高速REIT</td>\n",
       "      <td>7.141</td>\n",
       "      <td>-0.019</td>\n",
       "      <td>-0.27</td>\n",
       "      <td>15670.0</td>\n",
       "      <td>1.118705e+07</td>\n",
       "      <td>7.159</td>\n",
       "      <td>7.174</td>\n",
       "      <td>7.117</td>\n",
       "      <td>7.160</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>26</td>\n",
       "      <td>508009</td>\n",
       "      <td>中金安徽交控REIT</td>\n",
       "      <td>8.129</td>\n",
       "      <td>-0.030</td>\n",
       "      <td>-0.37</td>\n",
       "      <td>33995.0</td>\n",
       "      <td>2.763976e+07</td>\n",
       "      <td>8.154</td>\n",
       "      <td>8.159</td>\n",
       "      <td>8.119</td>\n",
       "      <td>8.159</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>27</td>\n",
       "      <td>508056</td>\n",
       "      <td>中金普洛斯REIT</td>\n",
       "      <td>3.580</td>\n",
       "      <td>-0.016</td>\n",
       "      <td>-0.44</td>\n",
       "      <td>64546.0</td>\n",
       "      <td>2.305100e+07</td>\n",
       "      <td>3.609</td>\n",
       "      <td>3.609</td>\n",
       "      <td>3.521</td>\n",
       "      <td>3.596</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>28</td>\n",
       "      <td>508066</td>\n",
       "      <td>华泰江苏交控REIT</td>\n",
       "      <td>6.923</td>\n",
       "      <td>-0.033</td>\n",
       "      <td>-0.47</td>\n",
       "      <td>18390.0</td>\n",
       "      <td>1.274584e+07</td>\n",
       "      <td>6.916</td>\n",
       "      <td>6.951</td>\n",
       "      <td>6.916</td>\n",
       "      <td>6.956</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>29</td>\n",
       "      <td>508027</td>\n",
       "      <td>东吴苏园产业REIT</td>\n",
       "      <td>3.180</td>\n",
       "      <td>-0.018</td>\n",
       "      <td>-0.56</td>\n",
       "      <td>66290.0</td>\n",
       "      <td>2.111244e+07</td>\n",
       "      <td>3.194</td>\n",
       "      <td>3.218</td>\n",
       "      <td>3.141</td>\n",
       "      <td>3.198</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>30</td>\n",
       "      <td>180101</td>\n",
       "      <td>博时蛇口产园REIT</td>\n",
       "      <td>1.947</td>\n",
       "      <td>-0.013</td>\n",
       "      <td>-0.66</td>\n",
       "      <td>149296.0</td>\n",
       "      <td>2.898595e+07</td>\n",
       "      <td>1.958</td>\n",
       "      <td>1.964</td>\n",
       "      <td>1.900</td>\n",
       "      <td>1.960</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>31</td>\n",
       "      <td>180102</td>\n",
       "      <td>华夏合肥高新REIT</td>\n",
       "      <td>1.909</td>\n",
       "      <td>-0.016</td>\n",
       "      <td>-0.83</td>\n",
       "      <td>56777.0</td>\n",
       "      <td>1.081247e+07</td>\n",
       "      <td>1.898</td>\n",
       "      <td>1.920</td>\n",
       "      <td>1.878</td>\n",
       "      <td>1.925</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>32</td>\n",
       "      <td>180401</td>\n",
       "      <td>鹏华深圳能源REIT</td>\n",
       "      <td>6.885</td>\n",
       "      <td>-0.062</td>\n",
       "      <td>-0.89</td>\n",
       "      <td>82062.0</td>\n",
       "      <td>5.664325e+07</td>\n",
       "      <td>6.940</td>\n",
       "      <td>6.965</td>\n",
       "      <td>6.870</td>\n",
       "      <td>6.947</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>33</td>\n",
       "      <td>508019</td>\n",
       "      <td>中金湖北科投光谷REIT</td>\n",
       "      <td>2.228</td>\n",
       "      <td>-0.021</td>\n",
       "      <td>-0.93</td>\n",
       "      <td>26232.0</td>\n",
       "      <td>5.858946e+06</td>\n",
       "      <td>2.246</td>\n",
       "      <td>2.284</td>\n",
       "      <td>2.215</td>\n",
       "      <td>2.249</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>34</td>\n",
       "      <td>508018</td>\n",
       "      <td>华夏中国交建REIT</td>\n",
       "      <td>5.461</td>\n",
       "      <td>-0.076</td>\n",
       "      <td>-1.37</td>\n",
       "      <td>111468.0</td>\n",
       "      <td>6.084459e+07</td>\n",
       "      <td>5.534</td>\n",
       "      <td>5.534</td>\n",
       "      <td>5.401</td>\n",
       "      <td>5.537</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>35</td>\n",
       "      <td>508098</td>\n",
       "      <td>嘉实京东仓储基础设施REIT</td>\n",
       "      <td>2.999</td>\n",
       "      <td>-0.083</td>\n",
       "      <td>-2.69</td>\n",
       "      <td>77957.0</td>\n",
       "      <td>2.353497e+07</td>\n",
       "      <td>3.072</td>\n",
       "      <td>3.072</td>\n",
       "      <td>2.990</td>\n",
       "      <td>3.082</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    序号      代码               名称     最新价    涨跌额   涨跌幅       成交量           成交额  \\\n",
       "0    1  508096       中航京能光伏REIT  10.399  0.170  1.66   13241.0  1.368326e+07   \n",
       "1    2  180501     红土创新深圳安居REIT   2.591  0.032  1.25   42845.0  1.099559e+07   \n",
       "2    3  508021  国泰君安临港创新产业园REIT   4.410  0.037  0.85   43551.0  1.908618e+07   \n",
       "3    4  180801       中航首钢绿能REIT  13.580  0.099  0.73   16392.0  2.214851e+07   \n",
       "4    5  508088    国泰君安东久新经济REIT   3.181  0.023  0.73   26466.0  8.406602e+06   \n",
       "5    6  508008       国金中国铁建REIT   9.515  0.062  0.66   43029.0  4.096097e+07   \n",
       "6    7  508031  国泰君安城投宽庭保租房REIT   3.053  0.015  0.49   17253.0  5.254575e+06   \n",
       "7    8  508028  中信建投国家电投新能源REIT  10.184  0.019  0.19   27912.0  2.838312e+07   \n",
       "8    9  508006       富国首创水务REIT   3.752  0.007  0.19   24728.0  9.280578e+06   \n",
       "9   10  180301      红土创新盐田港REIT   2.351  0.001  0.04   37960.0  8.937926e+06   \n",
       "10  11  508068      华夏北京保障房REIT   2.867  0.001  0.03   59046.0  1.693628e+07   \n",
       "11  12  508001        浙商沪杭甬REIT   8.241  0.002  0.02   16561.0  1.364811e+07   \n",
       "12  13  180201       平安广州广河REIT   9.718  0.002  0.02   19948.0  1.938464e+07   \n",
       "13  14  508077     华夏基金华润有巢REIT   2.450  0.000  0.00   78508.0  1.930020e+07   \n",
       "19  20  508000      华安张江产业园REIT   2.713 -0.001 -0.04   50262.0  1.363384e+07   \n",
       "20  21  508058       中金厦门安居REIT   2.767 -0.002 -0.07   78526.0  2.166828e+07   \n",
       "21  22  180103       华夏和达高科REIT   2.353 -0.003 -0.13   34246.0  8.039953e+06   \n",
       "22  23  508007       中金山东高速REIT   7.150 -0.012 -0.17   17998.0  1.286335e+07   \n",
       "23  24  508099        建信中关村REIT   2.338 -0.006 -0.26   81281.0  1.885344e+07   \n",
       "24  25  180202       华夏越秀高速REIT   7.141 -0.019 -0.27   15670.0  1.118705e+07   \n",
       "25  26  508009       中金安徽交控REIT   8.129 -0.030 -0.37   33995.0  2.763976e+07   \n",
       "26  27  508056        中金普洛斯REIT   3.580 -0.016 -0.44   64546.0  2.305100e+07   \n",
       "27  28  508066       华泰江苏交控REIT   6.923 -0.033 -0.47   18390.0  1.274584e+07   \n",
       "28  29  508027       东吴苏园产业REIT   3.180 -0.018 -0.56   66290.0  2.111244e+07   \n",
       "29  30  180101       博时蛇口产园REIT   1.947 -0.013 -0.66  149296.0  2.898595e+07   \n",
       "30  31  180102       华夏合肥高新REIT   1.909 -0.016 -0.83   56777.0  1.081247e+07   \n",
       "31  32  180401       鹏华深圳能源REIT   6.885 -0.062 -0.89   82062.0  5.664325e+07   \n",
       "32  33  508019     中金湖北科投光谷REIT   2.228 -0.021 -0.93   26232.0  5.858946e+06   \n",
       "33  34  508018       华夏中国交建REIT   5.461 -0.076 -1.37  111468.0  6.084459e+07   \n",
       "34  35  508098   嘉实京东仓储基础设施REIT   2.999 -0.083 -2.69   77957.0  2.353497e+07   \n",
       "\n",
       "       开盘价     最高价     最低价      昨收  \n",
       "0   10.213  10.400  10.213  10.229  \n",
       "1    2.572   2.593   2.534   2.559  \n",
       "2    4.353   4.414   4.320   4.373  \n",
       "3   13.481  13.622  13.370  13.481  \n",
       "4    3.119   3.199   3.119   3.158  \n",
       "5    9.467   9.555   9.375   9.453  \n",
       "6    3.037   3.058   3.024   3.038  \n",
       "7   10.165  10.195  10.115  10.165  \n",
       "8    3.730   3.761   3.729   3.745  \n",
       "9    2.337   2.368   2.310   2.350  \n",
       "10   2.866   2.876   2.850   2.866  \n",
       "11   8.206   8.249   8.205   8.239  \n",
       "12   9.616   9.814   9.616   9.716  \n",
       "13   2.450   2.480   2.431   2.450  \n",
       "19   2.687   2.730   2.675   2.714  \n",
       "20   2.756   2.798   2.751   2.769  \n",
       "21   2.341   2.361   2.300   2.356  \n",
       "22   7.185   7.250   7.100   7.162  \n",
       "23   2.329   2.344   2.290   2.344  \n",
       "24   7.159   7.174   7.117   7.160  \n",
       "25   8.154   8.159   8.119   8.159  \n",
       "26   3.609   3.609   3.521   3.596  \n",
       "27   6.916   6.951   6.916   6.956  \n",
       "28   3.194   3.218   3.141   3.198  \n",
       "29   1.958   1.964   1.900   1.960  \n",
       "30   1.898   1.920   1.878   1.925  \n",
       "31   6.940   6.965   6.870   6.947  \n",
       "32   2.246   2.284   2.215   2.249  \n",
       "33   5.534   5.534   5.401   5.537  \n",
       "34   3.072   3.072   2.990   3.082  "
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "reits_info"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "fund_etf_hist_sina_df = ak.fund_etf_hist_sina(symbol=\"sh508098\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>close</th>\n",
       "      <th>volume</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2023-02-08</td>\n",
       "      <td>3.862</td>\n",
       "      <td>4.000</td>\n",
       "      <td>3.845</td>\n",
       "      <td>3.923</td>\n",
       "      <td>49620561</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2023-02-09</td>\n",
       "      <td>3.917</td>\n",
       "      <td>3.952</td>\n",
       "      <td>3.890</td>\n",
       "      <td>3.942</td>\n",
       "      <td>8262884</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2023-02-10</td>\n",
       "      <td>3.945</td>\n",
       "      <td>4.076</td>\n",
       "      <td>3.945</td>\n",
       "      <td>4.025</td>\n",
       "      <td>12434506</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2023-02-13</td>\n",
       "      <td>4.025</td>\n",
       "      <td>4.082</td>\n",
       "      <td>4.018</td>\n",
       "      <td>4.039</td>\n",
       "      <td>6037981</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2023-02-14</td>\n",
       "      <td>4.041</td>\n",
       "      <td>4.117</td>\n",
       "      <td>4.041</td>\n",
       "      <td>4.104</td>\n",
       "      <td>7165664</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>258</th>\n",
       "      <td>2024-03-04</td>\n",
       "      <td>3.024</td>\n",
       "      <td>3.193</td>\n",
       "      <td>3.015</td>\n",
       "      <td>3.170</td>\n",
       "      <td>7469505</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>259</th>\n",
       "      <td>2024-03-05</td>\n",
       "      <td>3.170</td>\n",
       "      <td>3.249</td>\n",
       "      <td>3.113</td>\n",
       "      <td>3.179</td>\n",
       "      <td>8498419</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>260</th>\n",
       "      <td>2024-03-06</td>\n",
       "      <td>3.179</td>\n",
       "      <td>3.179</td>\n",
       "      <td>3.073</td>\n",
       "      <td>3.137</td>\n",
       "      <td>6094697</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>261</th>\n",
       "      <td>2024-03-07</td>\n",
       "      <td>3.117</td>\n",
       "      <td>3.193</td>\n",
       "      <td>3.060</td>\n",
       "      <td>3.082</td>\n",
       "      <td>7446161</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>262</th>\n",
       "      <td>2024-03-08</td>\n",
       "      <td>3.072</td>\n",
       "      <td>3.072</td>\n",
       "      <td>2.990</td>\n",
       "      <td>2.999</td>\n",
       "      <td>7795668</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>263 rows × 6 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "           date   open   high    low  close    volume\n",
       "0    2023-02-08  3.862  4.000  3.845  3.923  49620561\n",
       "1    2023-02-09  3.917  3.952  3.890  3.942   8262884\n",
       "2    2023-02-10  3.945  4.076  3.945  4.025  12434506\n",
       "3    2023-02-13  4.025  4.082  4.018  4.039   6037981\n",
       "4    2023-02-14  4.041  4.117  4.041  4.104   7165664\n",
       "..          ...    ...    ...    ...    ...       ...\n",
       "258  2024-03-04  3.024  3.193  3.015  3.170   7469505\n",
       "259  2024-03-05  3.170  3.249  3.113  3.179   8498419\n",
       "260  2024-03-06  3.179  3.179  3.073  3.137   6094697\n",
       "261  2024-03-07  3.117  3.193  3.060  3.082   7446161\n",
       "262  2024-03-08  3.072  3.072  2.990  2.999   7795668\n",
       "\n",
       "[263 rows x 6 columns]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "fund_etf_hist_sina_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "import datetime"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "fund_etf_hist_sina_df.set_index('date', inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>close</th>\n",
       "      <th>volume</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>221</th>\n",
       "      <td>2024-01-02</td>\n",
       "      <td>3.378</td>\n",
       "      <td>3.400</td>\n",
       "      <td>3.266</td>\n",
       "      <td>3.274</td>\n",
       "      <td>4370645</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>222</th>\n",
       "      <td>2024-01-03</td>\n",
       "      <td>3.273</td>\n",
       "      <td>3.273</td>\n",
       "      <td>3.185</td>\n",
       "      <td>3.198</td>\n",
       "      <td>4955584</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>223</th>\n",
       "      <td>2024-01-04</td>\n",
       "      <td>3.196</td>\n",
       "      <td>3.196</td>\n",
       "      <td>3.080</td>\n",
       "      <td>3.117</td>\n",
       "      <td>5018988</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>224</th>\n",
       "      <td>2024-01-05</td>\n",
       "      <td>3.116</td>\n",
       "      <td>3.116</td>\n",
       "      <td>2.831</td>\n",
       "      <td>2.881</td>\n",
       "      <td>6792637</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>225</th>\n",
       "      <td>2024-01-08</td>\n",
       "      <td>2.681</td>\n",
       "      <td>2.860</td>\n",
       "      <td>2.620</td>\n",
       "      <td>2.632</td>\n",
       "      <td>6159474</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           date   open   high    low  close   volume\n",
       "221  2024-01-02  3.378  3.400  3.266  3.274  4370645\n",
       "222  2024-01-03  3.273  3.273  3.185  3.198  4955584\n",
       "223  2024-01-04  3.196  3.196  3.080  3.117  5018988\n",
       "224  2024-01-05  3.116  3.116  2.831  2.881  6792637\n",
       "225  2024-01-08  2.681  2.860  2.620  2.632  6159474"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "this_year.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [],
   "source": [
    "def Percent(a,b):\n",
    "    return (a-b)/b*100"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-8.399511301160658"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "reits_list = reits_info['代码'].tolist()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "add_prefix_code = list(map(lambda x:'sh'+x if x.startswith('5') else 'sz'+x,reits_list))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['sh508096',\n",
       " 'sz180501',\n",
       " 'sh508021',\n",
       " 'sz180801',\n",
       " 'sh508088',\n",
       " 'sh508008',\n",
       " 'sh508031',\n",
       " 'sh508028',\n",
       " 'sh508006',\n",
       " 'sz180301',\n",
       " 'sh508068',\n",
       " 'sh508001',\n",
       " 'sz180201',\n",
       " 'sh508077',\n",
       " 'sh508000',\n",
       " 'sh508058',\n",
       " 'sz180103',\n",
       " 'sh508007',\n",
       " 'sh508099',\n",
       " 'sz180202',\n",
       " 'sh508009',\n",
       " 'sh508056',\n",
       " 'sh508066',\n",
       " 'sh508027',\n",
       " 'sz180101',\n",
       " 'sz180102',\n",
       " 'sz180401',\n",
       " 'sh508019',\n",
       " 'sh508018',\n",
       " 'sh508098']"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "add_prefix_code"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [],
   "source": [
    "result_dict = {}\n",
    "\n",
    "def analisys_reits(code):\n",
    "    fund_etf_hist_sina_df = ak.fund_etf_hist_sina(symbol=code)\n",
    "    fund_etf_hist_sina_df['date']=fund_etf_hist_sina_df['date'].astype(str)\n",
    "    this_year = fund_etf_hist_sina_df[fund_etf_hist_sina_df['date']>='2024-01-01']\n",
    "    p = Percent(this_year['close'].iloc[-1],this_year['close'].iloc[0])\n",
    "    result_dict[code] = p\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [],
   "source": [
    "for code in add_prefix_code:\n",
    "    analisys_reits(code)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'sh508096': 9.13002413684541,\n",
       " 'sz180501': 4.983792544570512,\n",
       " 'sh508021': -2.325581395348827,\n",
       " 'sz180801': 10.415480933409226,\n",
       " 'sh508088': -0.282131661442003,\n",
       " 'sh508008': 13.856647122173044,\n",
       " 'sh508031': 0.16404199475065268,\n",
       " 'sh508028': 9.153269024651653,\n",
       " 'sh508006': 15.268817204301072,\n",
       " 'sz180301': 1.8189692507578958,\n",
       " 'sh508068': 13.769841269841269,\n",
       " 'sh508001': 6.130070830650354,\n",
       " 'sz180201': 11.675476901861641,\n",
       " 'sh508077': 3.9016115351993252,\n",
       " 'sh508000': 9.21900161030596,\n",
       " 'sh508058': 6.87524140594824,\n",
       " 'sz180103': 6.470588235294128,\n",
       " 'sh508007': 10.852713178294577,\n",
       " 'sh508099': 12.08053691275169,\n",
       " 'sz180202': 17.469978614903773,\n",
       " 'sh508009': 10.613688937270368,\n",
       " 'sh508056': 8.649468892261005,\n",
       " 'sh508066': 4.989384288747342,\n",
       " 'sh508027': 4.502136049950707,\n",
       " 'sz180101': 20.931677018633536,\n",
       " 'sz180102': 6.707657909446625,\n",
       " 'sz180401': 11.951219512195111,\n",
       " 'sh508019': 3.4354688950789365,\n",
       " 'sh508018': 6.41075604053002,\n",
       " 'sh508098': -8.399511301160658}"
      ]
     },
     "execution_count": 68,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result_dict"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [],
   "source": [
    "reits_info['代码'] = reits_info['代码'].astype(str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [],
   "source": [
    "name_mapper = dict(zip(reits_info['代码'].tolist(),reits_info['名称'].tolist()))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [],
   "source": [
    "new_dict = {}\n",
    "for code,percent in result_dict.items():\n",
    "    # print(name_mapper[code],percent)\n",
    "    # if code.startswith('sh'):\n",
    "    new_dict[name_mapper[code[2:]]] = percent"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'中航京能光伏REIT': 9.13002413684541,\n",
       " '红土创新深圳安居REIT': 4.983792544570512,\n",
       " '国泰君安临港创新产业园REIT': -2.325581395348827,\n",
       " '中航首钢绿能REIT': 10.415480933409226,\n",
       " '国泰君安东久新经济REIT': -0.282131661442003,\n",
       " '国金中国铁建REIT': 13.856647122173044,\n",
       " '国泰君安城投宽庭保租房REIT': 0.16404199475065268,\n",
       " '中信建投国家电投新能源REIT': 9.153269024651653,\n",
       " '富国首创水务REIT': 15.268817204301072,\n",
       " '红土创新盐田港REIT': 1.8189692507578958,\n",
       " '华夏北京保障房REIT': 13.769841269841269,\n",
       " '浙商沪杭甬REIT': 6.130070830650354,\n",
       " '平安广州广河REIT': 11.675476901861641,\n",
       " '华夏基金华润有巢REIT': 3.9016115351993252,\n",
       " '华安张江产业园REIT': 9.21900161030596,\n",
       " '中金厦门安居REIT': 6.87524140594824,\n",
       " '华夏和达高科REIT': 6.470588235294128,\n",
       " '中金山东高速REIT': 10.852713178294577,\n",
       " '建信中关村REIT': 12.08053691275169,\n",
       " '华夏越秀高速REIT': 17.469978614903773,\n",
       " '中金安徽交控REIT': 10.613688937270368,\n",
       " '中金普洛斯REIT': 8.649468892261005,\n",
       " '华泰江苏交控REIT': 4.989384288747342,\n",
       " '东吴苏园产业REIT': 4.502136049950707,\n",
       " '博时蛇口产园REIT': 20.931677018633536,\n",
       " '华夏合肥高新REIT': 6.707657909446625,\n",
       " '鹏华深圳能源REIT': 11.951219512195111,\n",
       " '中金湖北科投光谷REIT': 3.4354688950789365,\n",
       " '华夏中国交建REIT': 6.41075604053002,\n",
       " '嘉实京东仓储基础设施REIT': -8.399511301160658}"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "new_dict"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [],
   "source": [
    "result_dict_month = {}\n",
    "\n",
    "def analisys_reits_month(code):\n",
    "    fund_etf_hist_sina_df = ak.fund_etf_hist_sina(symbol=code)\n",
    "    fund_etf_hist_sina_df['date']=fund_etf_hist_sina_df['date'].astype(str)\n",
    "    this_year = fund_etf_hist_sina_df[(fund_etf_hist_sina_df['date']>='2024-02-01') & (fund_etf_hist_sina_df['date']<'2024-03-01')]\n",
    "    p = Percent(this_year['close'].iloc[-1],this_year['close'].iloc[0])\n",
    "    result_dict_month[code] = p"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {},
   "outputs": [],
   "source": [
    "for code in add_prefix_code:\n",
    "    analisys_reits_month(code)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'sh508096': 7.546556951061056,\n",
       " 'sz180501': 9.913793103448276,\n",
       " 'sh508021': 11.80061037639878,\n",
       " 'sz180801': 7.579034941763724,\n",
       " 'sh508088': 15.38175046554934,\n",
       " 'sh508008': 8.956276445698172,\n",
       " 'sh508031': 7.392857142857154,\n",
       " 'sh508028': 5.582102519548212,\n",
       " 'sh508006': 9.875417806137959,\n",
       " 'sz180301': 13.636363636363628,\n",
       " 'sh508068': 8.71053632559909,\n",
       " 'sh508001': 5.688238315356954,\n",
       " 'sz180201': 8.82790165809034,\n",
       " 'sh508077': 13.96751740139212,\n",
       " 'sh508000': 17.52767527675276,\n",
       " 'sh508058': 8.476609356257505,\n",
       " 'sz180103': 10.498046874999993,\n",
       " 'sh508007': 3.8052434456928905,\n",
       " 'sh508099': 15.10015408320493,\n",
       " 'sz180202': 16.06175069797996,\n",
       " 'sh508009': 9.306397306397304,\n",
       " 'sh508056': 18.236272878535775,\n",
       " 'sh508066': 6.552044609665414,\n",
       " 'sh508027': 12.128801431127012,\n",
       " 'sz180101': 28.148657949070888,\n",
       " 'sz180102': 16.63527934714376,\n",
       " 'sz180401': 9.800664451827256,\n",
       " 'sh508019': 16.87898089171975,\n",
       " 'sh508018': 15.58139534883719,\n",
       " 'sh508098': 21.27659574468085}"
      ]
     },
     "execution_count": 66,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result_dict_month"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {},
   "outputs": [],
   "source": [
    "fund_open_fund_info_em_df = ak.fund_open_fund_info_em(symbol=\"sz180101\", indicator=\"单位净值走势\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: []\n",
       "Index: []"
      ]
     },
     "execution_count": 76,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "fund_open_fund_info_em_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "         基金代码                     基金简称 2024-03-08-单位净值 2024-03-08-累计净值  \\\n",
      "0      013852              中信建投低碳成长混合C          0.6083          0.6083   \n",
      "1      013851              中信建投低碳成长混合A          0.6137          0.6137   \n",
      "2      006887                 诺德新生活混合A          0.9517          0.9517   \n",
      "3      006888                 诺德新生活混合C           0.951           0.951   \n",
      "4      007731              民生加银持续成长混合A          1.1876          1.1876   \n",
      "...       ...                      ...             ...             ...   \n",
      "18391  020340   华泰柏瑞祥泰稳健养老目标偏债一年(FOF)Y                                   \n",
      "18392  019247     鹏华易选积极3个月持有期混合(FOF)A                                   \n",
      "18393  019657  万家优选积极三个月持有期混合发起式(FOF)A                                   \n",
      "18394  020859   华富泰合平衡3个月持有混合发起式(FOF)A                                   \n",
      "18395  020860   华富泰合平衡3个月持有混合发起式(FOF)C                                   \n",
      "\n",
      "      2024-03-07-单位净值 2024-03-07-累计净值    日增长值  日增长率  申购状态  赎回状态    手续费  \n",
      "0              0.5727          0.5727  0.0356  6.22  开放申购  开放赎回  0.00%  \n",
      "1              0.5778          0.5778  0.0359  6.21  开放申购  开放赎回  0.15%  \n",
      "2              0.8977          0.8977   0.054  6.02  开放申购  开放赎回  0.12%  \n",
      "3              0.8971          0.8971  0.0539  6.01  开放申购  开放赎回  0.00%  \n",
      "4              1.1235          1.1235  0.0641  5.71   限大额  开放赎回  0.15%  \n",
      "...               ...             ...     ...   ...   ...   ...    ...  \n",
      "18391                                                开放申购  开放赎回  0.00%  \n",
      "18392                                                开放申购  开放赎回  0.12%  \n",
      "18393                                                开放申购  开放赎回  0.15%  \n",
      "18394                                                暂停申购  暂停赎回  0.10%  \n",
      "18395                                                暂停申购  暂停赎回  0.00%  \n",
      "\n",
      "[18396 rows x 11 columns]\n"
     ]
    }
   ],
   "source": [
    "fund_open_fund_daily_em_df = ak.fund_open_fund_daily_em()\n",
    "print(fund_open_fund_daily_em_df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>基金代码</th>\n",
       "      <th>基金简称</th>\n",
       "      <th>2024-03-08-单位净值</th>\n",
       "      <th>2024-03-08-累计净值</th>\n",
       "      <th>2024-03-07-单位净值</th>\n",
       "      <th>2024-03-07-累计净值</th>\n",
       "      <th>日增长值</th>\n",
       "      <th>日增长率</th>\n",
       "      <th>申购状态</th>\n",
       "      <th>赎回状态</th>\n",
       "      <th>手续费</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [基金代码, 基金简称, 2024-03-08-单位净值, 2024-03-08-累计净值, 2024-03-07-单位净值, 2024-03-07-累计净值, 日增长值, 日增长率, 申购状态, 赎回状态, 手续费]\n",
       "Index: []"
      ]
     },
     "execution_count": 78,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "fund_open_fund_daily_em_df[fund_open_fund_daily_em_df['基金代码']=='180101']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_reits_netvalue(code):\n",
    "    import requests\n",
    "\n",
    "    cookies = {\n",
    "        'device_id': '21693126f9ffeff99cfca99835e6d54e',\n",
    "        's': 'bn11gfbify',\n",
    "        'bid': '4a7809eff12dfb426fecf9028b9a8727_ljgntwcu',\n",
    "        'cookiesu': '621702237077740',\n",
    "        'remember': '1',\n",
    "        'u': '2339396598',\n",
    "        'xq_a_token': 'b630b67d5eb6a5363b9a4578dcd11b6ead33a73a',\n",
    "        'xqat': 'b630b67d5eb6a5363b9a4578dcd11b6ead33a73a',\n",
    "        'xq_r_token': '1dccabeabdb33674556d8e93363cb496d1ac032b',\n",
    "        'xq_is_login': '1',\n",
    "        'xq_id_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1aWQiOjIzMzkzOTY1OTgsImlzcyI6InVjIiwiZXhwIjoxNzExOTY4NDYwLCJjdG0iOjE3MDk5MTMxNzE4NDQsImNpZCI6ImQ5ZDBuNEFadXAifQ.cciFilp8cpclmG3DTDd6sdZFwZ4Byh-zEsxg68Rmxa-ADCH9feN9dq9XRKw8p6fgs0jpsPQm_7CZorxGNk5mTcW12z4dmZuhoC8RfiJ3kI0_gS_Ez78q1R3nPkDx4A5nPql_atHwYKz7gS0srfvS1JokpdPSYoCTRUiA4ZyVmyh1VSKwzvVBil4UFgPyLyM7jGPgpL_kJBXxUrl65zTZ5tFbMheYXVMQruTPG-O4r17oRIg8RasZu8kG1Ru6Ljs95F6NF8MEqc1Fzzc13QYdoIaNHRAzG9MBi4VFrNq4zvqOxBf_KqJCDwV1w6SDtKMOb9PtCrvvzwoGdr71Cq-Wng',\n",
    "        'Hm_lvt_1db88642e346389874251b5a1eded6e3': '1709912478,1709944327,1709999363,1710077952',\n",
    "        'Hm_lpvt_1db88642e346389874251b5a1eded6e3': '1710084129',\n",
    "        'is_overseas': '0',\n",
    "    }\n",
    "\n",
    "    headers = {\n",
    "        'authority': 'stock.xueqiu.com',\n",
    "        'accept': '*/*',\n",
    "        'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8',\n",
    "        'cache-control': 'no-cache',\n",
    "        # 'cookie': 'device_id=21693126f9ffeff99cfca99835e6d54e; s=bn11gfbify; bid=4a7809eff12dfb426fecf9028b9a8727_ljgntwcu; cookiesu=621702237077740; remember=1; u=2339396598; xq_a_token=b630b67d5eb6a5363b9a4578dcd11b6ead33a73a; xqat=b630b67d5eb6a5363b9a4578dcd11b6ead33a73a; xq_r_token=1dccabeabdb33674556d8e93363cb496d1ac032b; xq_is_login=1; xq_id_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1aWQiOjIzMzkzOTY1OTgsImlzcyI6InVjIiwiZXhwIjoxNzExOTY4NDYwLCJjdG0iOjE3MDk5MTMxNzE4NDQsImNpZCI6ImQ5ZDBuNEFadXAifQ.cciFilp8cpclmG3DTDd6sdZFwZ4Byh-zEsxg68Rmxa-ADCH9feN9dq9XRKw8p6fgs0jpsPQm_7CZorxGNk5mTcW12z4dmZuhoC8RfiJ3kI0_gS_Ez78q1R3nPkDx4A5nPql_atHwYKz7gS0srfvS1JokpdPSYoCTRUiA4ZyVmyh1VSKwzvVBil4UFgPyLyM7jGPgpL_kJBXxUrl65zTZ5tFbMheYXVMQruTPG-O4r17oRIg8RasZu8kG1Ru6Ljs95F6NF8MEqc1Fzzc13QYdoIaNHRAzG9MBi4VFrNq4zvqOxBf_KqJCDwV1w6SDtKMOb9PtCrvvzwoGdr71Cq-Wng; Hm_lvt_1db88642e346389874251b5a1eded6e3=1709912478,1709944327,1709999363,1710077952; Hm_lpvt_1db88642e346389874251b5a1eded6e3=1710084129; is_overseas=0',\n",
    "        'origin': 'https://xueqiu.com',\n",
    "        'pragma': 'no-cache',\n",
    "        'referer': 'https://xueqiu.com/S/SZ180101',\n",
    "        'sec-ch-ua': '\"Chromium\";v=\"110\", \"Not A(Brand\";v=\"24\", \"Google Chrome\";v=\"110\"',\n",
    "        'sec-ch-ua-mobile': '?0',\n",
    "        'sec-ch-ua-platform': '\"Linux\"',\n",
    "        'sec-fetch-dest': 'empty',\n",
    "        'sec-fetch-mode': 'cors',\n",
    "        'sec-fetch-site': 'same-site',\n",
    "        'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36',\n",
    "    }\n",
    "\n",
    "    params = {\n",
    "        'symbol': code,\n",
    "        'extend': 'detail',\n",
    "    }\n",
    "\n",
    "    response = requests.get('https://stock.xueqiu.com/v5/stock/quote.json', params=params, cookies=cookies, headers=headers)\n",
    "    res = response.json()\n",
    "    premium_rate = res['data']['quote']['premium_rate']\n",
    "    print(premium_rate)\n",
    "    return premium_rate"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-15.45\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "-15.45"
      ]
     },
     "execution_count": 83,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "get_reits_netvalue('SH508098')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "4.93\n",
      "3.72\n",
      "5.53\n",
      "34.04\n",
      "3.62\n",
      "6.25\n",
      "0.1\n",
      "2.71\n",
      "14.85\n",
      "1.47\n",
      "13.36\n",
      "20.2\n",
      "-19.73\n",
      "0.62\n",
      "-9.08\n",
      "7.08\n",
      "-16.91\n",
      "2.85\n",
      "-25.35\n",
      "7.14\n",
      "-15.99\n",
      "-2.19\n",
      "30.97\n",
      "-15.43\n",
      "-15.82\n",
      "-13.58\n",
      "13.54\n",
      "-15.73\n",
      "-40.42\n",
      "-15.45\n"
     ]
    }
   ],
   "source": [
    "premium_rate_dict = {}\n",
    "for code in add_prefix_code:\n",
    "    premium_rate = get_reits_netvalue(code)\n",
    "    premium_rate_dict[code] = premium_rate\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'sh508096': 4.93,\n",
       " 'sz180501': 3.72,\n",
       " 'sh508021': 5.53,\n",
       " 'sz180801': 34.04,\n",
       " 'sh508088': 3.62,\n",
       " 'sh508008': 6.25,\n",
       " 'sh508031': 0.1,\n",
       " 'sh508028': 2.71,\n",
       " 'sh508006': 14.85,\n",
       " 'sz180301': 1.47,\n",
       " 'sh508068': 13.36,\n",
       " 'sh508001': 20.2,\n",
       " 'sz180201': -19.73,\n",
       " 'sh508077': 0.62,\n",
       " 'sh508000': -9.08,\n",
       " 'sh508058': 7.08,\n",
       " 'sz180103': -16.91,\n",
       " 'sh508007': 2.85,\n",
       " 'sh508099': -25.35,\n",
       " 'sz180202': 7.14,\n",
       " 'sh508009': -15.99,\n",
       " 'sh508056': -2.19,\n",
       " 'sh508066': 30.97,\n",
       " 'sh508027': -15.43,\n",
       " 'sz180101': -15.82,\n",
       " 'sz180102': -13.58,\n",
       " 'sz180401': 13.54,\n",
       " 'sh508019': -15.73,\n",
       " 'sh508018': -40.42,\n",
       " 'sh508098': -15.45}"
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "premium_rate_dict"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "508096 中航京能光伏REIT 4.93\n",
      "180501 红土创新深圳安居REIT 3.72\n",
      "508021 国泰君安临港创新产业园REIT 5.53\n",
      "180801 中航首钢绿能REIT 34.04\n",
      "508088 国泰君安东久新经济REIT 3.62\n",
      "508008 国金中国铁建REIT 6.25\n",
      "508031 国泰君安城投宽庭保租房REIT 0.1\n",
      "508028 中信建投国家电投新能源REIT 2.71\n",
      "508006 富国首创水务REIT 14.85\n",
      "180301 红土创新盐田港REIT 1.47\n",
      "508068 华夏北京保障房REIT 13.36\n",
      "508001 浙商沪杭甬REIT 20.2\n",
      "180201 平安广州广河REIT -19.73\n",
      "508077 华夏基金华润有巢REIT 0.62\n",
      "508000 华安张江产业园REIT -9.08\n",
      "508058 中金厦门安居REIT 7.08\n",
      "180103 华夏和达高科REIT -16.91\n",
      "508007 中金山东高速REIT 2.85\n",
      "508099 建信中关村REIT -25.35\n",
      "180202 华夏越秀高速REIT 7.14\n",
      "508009 中金安徽交控REIT -15.99\n",
      "508056 中金普洛斯REIT -2.19\n",
      "508066 华泰江苏交控REIT 30.97\n",
      "508027 东吴苏园产业REIT -15.43\n",
      "180101 博时蛇口产园REIT -15.82\n",
      "180102 华夏合肥高新REIT -13.58\n",
      "180401 鹏华深圳能源REIT 13.54\n",
      "508019 中金湖北科投光谷REIT -15.73\n",
      "508018 华夏中国交建REIT -40.42\n",
      "508098 嘉实京东仓储基础设施REIT -15.45\n"
     ]
    }
   ],
   "source": [
    "for code,premium_rate in premium_rate_dict.items():\n",
    "    print(code[2:],name_mapper[code[2:]],premium_rate)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "508096 中航京能光伏REIT 4.93\n",
      "180501 红土创新深圳安居REIT 3.72\n",
      "508021 国泰君安临港创新产业园REIT 5.53\n",
      "180801 中航首钢绿能REIT 34.04\n",
      "508088 国泰君安东久新经济REIT 3.62\n",
      "508008 国金中国铁建REIT 6.25\n",
      "508031 国泰君安城投宽庭保租房REIT 0.1\n",
      "508028 中信建投国家电投新能源REIT 2.71\n",
      "508006 富国首创水务REIT 14.85\n",
      "180301 红土创新盐田港REIT 1.47\n",
      "508068 华夏北京保障房REIT 13.36\n",
      "508001 浙商沪杭甬REIT 20.2\n",
      "180201 平安广州广河REIT -19.73\n",
      "508077 华夏基金华润有巢REIT 0.62\n",
      "508000 华安张江产业园REIT -9.08\n",
      "508058 中金厦门安居REIT 7.08\n",
      "180103 华夏和达高科REIT -16.91\n",
      "508007 中金山东高速REIT 2.85\n",
      "508099 建信中关村REIT -25.35\n",
      "180202 华夏越秀高速REIT 7.14\n",
      "508009 中金安徽交控REIT -15.99\n",
      "508056 中金普洛斯REIT -2.19\n",
      "508066 华泰江苏交控REIT 30.97\n",
      "508027 东吴苏园产业REIT -15.43\n",
      "180101 博时蛇口产园REIT -15.82\n",
      "180102 华夏合肥高新REIT -13.58\n",
      "180401 鹏华深圳能源REIT 13.54\n",
      "508019 中金湖北科投光谷REIT -15.73\n",
      "508018 华夏中国交建REIT -40.42\n",
      "508098 嘉实京东仓储基础设施REIT -15.45\n"
     ]
    }
   ],
   "source": [
    "for code,premium_rate in premium_rate_dict.items():\n",
    "    print(code[2:],name_mapper[code[2:]],premium_rate)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "cpy",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
